package com.quectel.sdk.hikisc.entranceguard;

import cn.hutool.crypto.digest.MD5;
import com.quectel.sdk.hikisc.HikClientBuilder;
import com.quectel.sdk.hikisc.entranceguard.model.SyncGuardResp;
import com.quectel.util.common.JacksonUtils;

import java.nio.charset.StandardCharsets;
import java.util.List;

/**
 * @author rananxin
 * @email ryan.ran@quectel.com
 * @date 2022/11/14 10:59
 */
public class EntranceGuardTest {

    public static void main(String[] args) {
        System.out.println(MD5.create().digestHex("/openapi/service/vss/preview/getPreviewParamByCameraUuid{\"appkey\":\"24982ba6\",\"time\":1479364577369, \"\n" +
                "opUserUuid\":\"43a9a55f76474bde89ecabc1d6914a7f\",\"cameraUuid\":\"b785bcf358154a4594651b4b21ddd0af\",\"netZoneUu\n" +
                "id\":\"11d0e493870d40f9b2589383cf73001f\"}aa7aa8a8fa604c60866413f52563b70c".getBytes(StandardCharsets.UTF_8)));
        EntranceGuardClient build = HikClientBuilder.builder().ak("366c034c").sk("07c09d194d4444ca911697ad3e51266f").host("18.0.2.2").build(EntranceGuardClient.class);
        List<SyncGuardResp> syncGuardResps =
                build.drawResources();
        System.out.println(JacksonUtils.toJsonString(syncGuardResps));
    }
}
